<template>
  <div class="content">
    <van-row>
      <van-col>
        <app class="app"></app>
      </van-col>
    </van-row>
    <van-row v-if="true">
      <van-col>
        <van-tabbar v-model="active" @change="onChange" :safe-area-inset-bottom="true">
          <van-tabbar-item icon="chat-o">消息</van-tabbar-item>
          <van-tabbar-item icon="home-o">应用</van-tabbar-item>
          <van-tabbar-item icon="manager-o">我的</van-tabbar-item>
        </van-tabbar>
      </van-col>
    </van-row>
  </div>
</template>
<script>
import { Notify } from "vant";
import App from "./App";
import comm from "../../tools/comm";
import tools from "../../tools/tools";
import api from "../../tools/api";
import ui from "../../tools/ui";
export default {
  components: {
    App
  },
  data() {
    return {
      active: 1
    };
  },
  mounted() {
    // this.getSettingInfo();
  },

  methods: {
    onChange(index) {
      Notify({ type: "primary", message: index });
    },

    getSettingInfo() {
      //获取app参数设置 更新到本地
      api.ajax({
        methodName: "setting/getByType",
        data: {
          type: 2,
          pageIndex: 0,
          pageSize: 1000
        },
        s(code, res) {
          if (code == 1) {
            let data = res.data;
            // tools.logToStr(data);
            data.list.forEach(e => {
              tools.setLocalData(e.settingItemKey, e.settingItemValue);
            });
          }
        }
      });
    }
  }
};
</script>
<style scoped>
.content {
  position: relative;
  height: 100vh;
}
.app {
  position: relative;
  margin-bottom: 48px;
}
.van-tabbar-item {
  font-size: 16px;
}
.van-tabbar {
  height: 50px;
}
</style>